package digest;

import java.util.HashMap;
import java.util.Map;

public class ClassBean {
    private String no;

    private Map<Integer,StudentBean> students=new HashMap<Integer,StudentBean>();

    public ClassBean() {
    }

    public void addStudent(StudentBean studentBean){
        if(studentBean!=null){
            students.put(studentBean.getId(),studentBean);
        }
    }


    public StudentBean findStudent(Integer id){
        return students.get(id);
    }


    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public Map<Integer, StudentBean> getStudents() {
        return students;
    }

    public void setStudents(Map<Integer, StudentBean> students) {
        this.students = students;
    }
}
